package com.shilei.builder;

/**
 * @description: 复杂的地图Builder
 * @author: 81271
 * @date: 2020-04-22 19:43
 */
public class ComplexTerrainBuilder implements TerrainBuilder{
    private Terrain terrain = new Terrain();

    @Override
    public TerrainBuilder buildWall() {
        terrain.wall = new Wall(1,1,1,1);
        return this;
    }

    @Override
    public TerrainBuilder buildLawn() {
        terrain.lawn = new Lawn(2,2,2,2);
        return this;
    }

    @Override
    public TerrainBuilder buildRiver() {
        terrain.river = new River(3,3,3,3);
        return this;
    }

    @Override
    public Terrain build() {
        return terrain;
    }
}
